﻿using System.Configuration;

namespace BaseConfig;

/// <summary>
///     系统配置类
/// </summary>
public class Config
{
    /// <summary>
    ///     获取数据库连接字符串
    /// </summary>
    /// <returns></returns>
    public static string GetDbConnectString()
    {
        // 读取 App.config 文件中的配置项
        var settingValue = ConfigurationManager
            .ConnectionStrings["ConnectionString"]
            .ConnectionString;

        return settingValue;
    }
}